package cn.cmcc.online.smsapi.ui.widget;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;

/**
 * Created by ZhangYifan on 2017/6/14.
 */

public class SpotDivier extends View {

    public SpotDivier(Context context) {
        super(context);
        setBackgroundColor(Color.WHITE);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        Paint paint = new Paint();
        paint.setColor(Color.argb(255, 225, 225, 225));
        float dp2 = (getContext().getResources().getDisplayMetrics().density * 2);
        float x = dp2;
        for (int i = 0; i < 75; i++) {
            canvas.drawCircle(x, dp2 / 2F, dp2 / 2F, paint);
            x += (dp2 * 2);
        }
    }
}
